mcabnormalitiesfandomcom-20200214-history
Mapmaking commands
The following commands can give items and mobs custom abilities. /testforclick This command tests for clicks in certain items, certain directions, at certain players. It utilizes certain ranges within X, Y, Z, X2, Y2, and Z2 ranges. Here's an example syntax: /testforclick @p {item:diamond_axe, name=Warhammer} ~ ~-1 ~ ~ ~ ~ When hooked into a comparator that summons an Area Effect Cloud with effects like blindness and damage at the nearest player, then removing effects and healing that player, it simulates pounding the ground and making an Area of Effect effect that hurts any surrounding entities but revokes the effects from that player. /testforhit This command can test for hits from mobs and players. For instance, say we have a zombie that can move at extremely fast speeds. You want it to explode on impact with a player when it harms them. The syntax uses the hitting entity and the entity hit, respectively, in the command. You would use this: /testforhit ZombieCustomName:"Charger" @p When hooked into a comparator and command block that summons a Creeper that has a fuse of 0 and is active, any Zombie named Charger will explode, but only when they hit the nearest player. If you wanted it to affect every player it hits, use selectors like @a. /forcemotion This forces movement of an entity. For instance, it could path an armored zombie guard around the premises. It could also make a mob charge at a player that gets within X blocks of it. It uses the coordinates of two or more points as well as different tags like Repeat (repeat X times, inf=infinite times) (will make the mob pathfind to the beginning if end doesn't encounter it), Reverse (reverses the pathing when they reach the end, can also decide the amount of times), etc. I will give two example syntaxes for both the charging motion and the pathing example: /forcemotion ZombieCustomName:"Charger" @p {Speed:.5} This makes the zombie named Charger always try to charge towards the nearest player at high speeds. If you want it to only be occasionally, however: /forcemotion ZombieCustomName:"Charger" @p {Noticed:1b,{MotionDelay:50CanMove:1b,{Speed:.5}}} This makes the zombie named Charger able to charge towards the nearest player at high speeds when it meets the criteria of having noticed that player and having not used the forcemotion charging motion for at least 50 ticks. The CanMove tag allows it to move and use its regular AI during the cooldown of not being able to charge. Now for the next example: /forcemotion Vindication_Villager {123 -34 7} {123 -34 9} {134 -34 9} {134 -34 7} (Repeat:inf),{EncounterPlayer:Guard} This makes a Vindicator go in the rectangle provided an infinite amount of times, and when they encounter a player they guard the area. This means they attack the player if they get too close to their path or to them, but then return to their previous spot and resume their action when the threat is nullified. Different tags (like Destroy, destroy the interference at all costs then return, or Forget, go back to regular AI and forget the previous /forcemotion) could exist. Those were my ideas for commands that could help in my aforementioned situation. They would be a great help for maps and generally having fun. Category:Sendineis Category:Command